#include <stm8s_tim2.h>

void TIM2_ForcedOC2Config(TIM2_ForcedAction_TypeDef TIM2_ForcedAction)
{
  /* Check the parameters */
  assert_param(IS_TIM2_FORCED_ACTION_OK(TIM2_ForcedAction));
  
  /* Reset the OCM Bits & Configure the Forced output Mode */
  TIM2->CCMR2 = (uint8_t)((uint8_t)(TIM2->CCMR2 & (uint8_t)(~TIM2_CCMR_OCM))  
                          | (uint8_t)TIM2_ForcedAction);
}

/**
  * @brief  Forces the TIM2 Channel3 output waveform to active or inactive level.
  * @param   TIM2_ForcedAction specifies the forced Action to be set to the output waveform.
  * This parameter can be one of the following values:
  *                       - TIM2_FORCEDACTION_ACTIVE: Force active level on OC3REF
  *                       - TIM2_FORCEDACTION_INACTIVE: Force inactive level on
  *                         OC3REF.
  * @retval None
  */
